package com.feinno.urcs.group.http.servlet;

import com.feinno.urcs.group.api.GroupInfoVersionCacheManager;
import com.feinno.urcs.group.api.GroupListVersionCacheManager;
import com.feinno.urcs.group.api.GroupService;
import com.feinno.urcs.group.http.util.XcapParser;
import com.feinno.urcs.group.interop.FxDataValidateService;
import com.feinno.urcs.nai.IMPU;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by wuzhiguo on 15-5-19.
 */
public class GroupHttpContext {

    private GroupService groupService;
    private GroupListVersionCacheManager groupListVersionCacheManager;
    private GroupInfoVersionCacheManager groupInfoVersionCacheManager;
    private HttpServletRequest request;
    private HttpServletResponse response;
    private XcapParser parser;
    private String bodyString;
    private IMPU senderIMPU;
    private IMPU xuiIMPU;
    private IMPU targetIMPU;



    private FxDataValidateService fxDataValidateService;

    public GroupInfoVersionCacheManager getGroupInfoVersionCacheManager() {
        return groupInfoVersionCacheManager;
    }

    public void setGroupInfoVersionCacheManager(GroupInfoVersionCacheManager groupInfoVersionCacheManager) {
        this.groupInfoVersionCacheManager = groupInfoVersionCacheManager;
    }

    public GroupHttpContext(GroupService groupService,
                            HttpServletRequest request,
                            HttpServletResponse response,
                            XcapParser parser,
                            String bodyString,
                            IMPU senderIMPU,
                            IMPU xuiIMPU,
                            IMPU targetIMPU,
                            GroupListVersionCacheManager groupListVersionCacheManager,
                            GroupInfoVersionCacheManager groupInfoVersionCacheManager) {
        this.groupService = groupService;
        this.request = request;
        this.response = response;
        this.parser = parser;
        this.bodyString = bodyString;
        this.senderIMPU = senderIMPU;
        this.xuiIMPU = xuiIMPU;
        this.targetIMPU = targetIMPU;
        this.groupListVersionCacheManager = groupListVersionCacheManager;
        this.groupInfoVersionCacheManager = groupInfoVersionCacheManager;

    }

    public GroupService getGroupService() {
        return groupService;
    }

    public void setGroupService(GroupService groupService) {
        this.groupService = groupService;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public void setRequest(HttpServletRequest request) {
        this.request = request;
    }

    public HttpServletResponse getResponse() {
        return response;
    }

    public void setResponse(HttpServletResponse response) {
        this.response = response;
    }

    public XcapParser getParser() {
        return parser;
    }

    public void setParser(XcapParser parser) {
        this.parser = parser;
    }

    public String getBodyString() {
        return bodyString;
    }

    public void setBodyString(String bodyString) {
        this.bodyString = bodyString;
    }

    public IMPU getSenderIMPU() {
        return senderIMPU;
    }

    public void setSenderIMPU(IMPU senderIMPU) {
        this.senderIMPU = senderIMPU;
    }

    public IMPU getXuiIMPU() {
        return xuiIMPU;
    }

    public void setXuiIMPU(IMPU xuiIMPU) {
        this.xuiIMPU = xuiIMPU;
    }

    public IMPU getTargetIMPU() {
        return targetIMPU;
    }

    public void setTargetIMPU(IMPU targetIMPU) {
        this.targetIMPU = targetIMPU;
    }

    public void setFxDataValidateService(FxDataValidateService fxDataValidateService) {
        this.fxDataValidateService = fxDataValidateService;
    }
    public FxDataValidateService getFxDataValidateService() {
        return fxDataValidateService;
    }

    public GroupListVersionCacheManager getGroupListVersionCacheManager() {
        return groupListVersionCacheManager;
    }

    public void setGroupListVersionCacheManager(GroupListVersionCacheManager groupListVersionCacheManager) {
        this.groupListVersionCacheManager = groupListVersionCacheManager;
    }
}
